import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Vant from 'vant'
import 'vant/lib/index.css'

import VueSocketIO from 'vue-socket.io'
// import SocketIO from 'socket.io-client'

Vue.use(
  new VueSocketIO({
    debug: true,
    // connection: SocketIO('ws://127.0.0.1:3000'),
    connection: 'ws://127.0.0.1:3000',
    vuex: {
      store,
      actionPrefix: 'SOCKET_',
      mutationPrefix: 'SOCKET_'
    },
    options: {
      autoConnect: false
    }
  })
)

Vue.use(Vant)

Vue.config.productionTip = false

new Vue({
  store,
  router,
  render: (h) => h(App)
}).$mount('#app')
